﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Core
{
    /// <summary>
    /// Logical connective factory
    /// </summary>
    public static class LogicalConnectiveFactory
    {
        /// <summary>
        /// Create logical connective from its name
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static LogicalConnective Create(String name)
        {
            switch (name)
            {
                case "and":
                    return new Conjunction();
                case "or":
                    return new Disjunction();
            }

            throw new NotSupportedException();
        }
    }
}
